package com.liuzh.deviceinfo.settings;

import android.app.ProgressDialog;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import c.h.a.m0.h;
import c.h.b.a.a.b;
import c.h.b.a.a.c;
import com.liuzh.deviceinfo.base.BaseActivity;

public class DonateActivity extends BaseActivity implements OnClickListener {
    public static final /* synthetic */ int v = 0;
    public TextView q;
    public ImageView r;
    public TextView s;
    public TextView t;
    public boolean u = true;

    public class a extends b {
        public final /* synthetic */ ProgressDialog a;

        public a(ProgressDialog progressDialog) {
            this.a = progressDialog;
        }

        public void b() {
            c.f.a.a.a.a.z("ad_donaate");
        }

        public void d(String str) {
            this.a.dismiss();
            c.f.a.a.a.a.x("ad_donaate", str);
            Toast.makeText(DonateActivity.this, 2131690051, 0).show();
        }

        public void f(c.h.b.a.b.b bVar) {
            this.a.dismiss();
            bVar.a(DonateActivity.this, new c.h.a.i0.b(this));
        }
    }

    public final void A() {
        ProgressDialog progressDialog = new ProgressDialog(this);
        progressDialog.setCancelable(false);
        progressDialog.show();
        c.f.a.a.a.a.y("ad_donaate");
        c.a(this, c.h.a.u.a.e, new a(progressDialog));
    }

    public void onClick(View view) {
        switch (view.getId()) {
            case 2131296407:
                if (this.u) {
                    this.q.setText(2131689809);
                    this.r.setImageResource(2131231116);
                    this.t.setText(2131690171);
                } else {
                    this.q.setText(2131689805);
                    this.r.setImageResource(2131231115);
                    this.t.setText(2131690172);
                }
                int i = this.u ^ 1;
                this.u = i;
                if (i == 0) {
                    this.s.setVisibility(8);
                    return;
                } else {
                    this.s.setVisibility(0);
                    return;
                }
            case 2131296519:
                A();
                return;
            case 2131296520:
                h.v(this);
                return;
            default:
                return;
        }
    }

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        z();
        setTitle(2131690349);
        setContentView(2131492894);
        this.q = (TextView) findViewById(2131296498);
        this.r = (ImageView) findViewById(2131296812);
        TextView textView = (TextView) findViewById(2131296407);
        this.t = textView;
        textView.setOnClickListener(this);
        textView = (TextView) findViewById(2131296520);
        this.s = textView;
        textView.setOnClickListener(this);
        findViewById(2131296519).setOnClickListener(this);
    }
}
